package cn.com.wangluotongxin.admin.model.constants;

public enum SmsAppInfo {

    ADMIN(1, "管理平台"),
    LX_APP(2, "恋信APP");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    private String name;

    public String getName() {
        return name;
    }

    public static SmsAppInfo getByCode(Integer code){
        if(code == null){
            return null;
        }else {
            SmsAppInfo[] smsAppInfos = values();
            for(SmsAppInfo smsAppInfo : smsAppInfos){
                if(smsAppInfo.getCode().equals(code)){
                    return smsAppInfo;
                }
            }
        }
        return null;
    }

    SmsAppInfo(Integer code, String name){
        this.code = code;
        this.name = name;
    }
}
